/*
 *  Copyright © OpenAtom Foundation.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.openatom.ubml.model.common.definition.commonmodel;

import java.util.List;
import org.openatom.ubml.model.common.definition.cef.entity.DataTypeAssemblyInfo;
import org.openatom.ubml.model.common.definition.cef.variable.CommonVariableEntity;
import org.openatom.ubml.model.common.definition.commonmodel.entity.VersionControlInfo;

/**
 * The Interface  Of Common Model
 *
 * @ClassName: IGspCommonElement
 * @Author: Benjamin Gong
 * @Date: 2021/1/11 17:13
 * @Version: V1.0
 */
public interface IGspCommonModel extends Cloneable {

    /**
     * @return The Id Of The Model
     */
    String getID();

    /**
     * @param value The Id Of The Model
     */
    void setID(String value);


    /**
     * @return The Code Of The Model
     */
    String getCode();

    /**
     * @param value The Code Of The Model
     */
    void setCode(String value);


    /**
     * @return The Name Of The Model
     */
    String getName();

    /**
     * @param value The Name Of The Model
     */
    void setName(String value);

    /**
     * @return The Labels Of The Model
     */
    List<String> getBeLabel();

    /**
     * @param value The Labels Of The Model
     */
    void setBeLabel(List<String> value);


    /**
     * @return Wether The Model Is Virtual
     */
    boolean getIsVirtual();

    /**
     * @param value Wether The Model Is Virtual
     */
    void setIsVirtual(boolean value);


    /**
     * @return The Primary Key Element Id
     */
    String getPrimayKeyID();

    /**
     * @return The Root Node Of The Model
     */
    IGspCommonObject getMainObject();

    /**
     * @param value The Root Node Of The Model
     */
    void setMainObject(IGspCommonObject value);

    /**
     * @return The Extend Type Of The Model,It Can Be A BE , A VO Or Something Else
     */
    String getExtendType();


    /**
     * @return The Entity Type Of The Model
     */
    String getEntityType();

    /**
     * @param value The Entity Type Of The Model
     */
    void setEntityType(String value);


    /**
     * @return The Extend Node List
     */
    java.util.HashMap<String, String> getExtendNodeList();


    /**
     * @return The Assembly Name Of The Model,In Java It`s Means The Package Name
     */
    String getGeneratingAssembly();

    /**
     * @param value The Assembly Name Of The Model,In Java It`s Means The Package Name
     */
    void setGeneratingAssembly(String value);

    /**
     * @return The Dotnet Assembly Name Of The Model,In Dotnet It`s Means The Dll Name.But It Is Useless Now
     */
    String getDotnetGeneratingAssembly();

    /**
     * @return The Variables In The Model
     */
    CommonVariableEntity getVariables();

    /**
     * @param value The Variables In The Model
     */
    void setVariables(CommonVariableEntity value);

    /**
     * @return The I18n Resource Info Prefix,It Means The Prefix Of The Resource Item Key In The Resource Meatadata Generated By The Meatadata
     */
    String getI18nResourceInfoPrefix();

    /**
     * @return Wether Use Namespace Config In The Runtime
     */
    boolean getIsUseNamespaceConfig();

    /**
     * @param value Wether Use Namespace Config In The Runtime
     */
    void setIsUseNamespaceConfig(boolean value);
    // endregion

    /**
     * @param elementID The Id Of Element To Find
     * @return
     */
    IGspCommonElement findElementById(String elementID);

    /**
     * @param code The Code Of The Element To Find
     * @return
     */
    IGspCommonObject findObjectByCode(String code);

    /**
     * @return All Objects Of The Model
     */
    java.util.ArrayList<IGspCommonObject> getAllObjectList();

    /**
     * @return The Primary Key Constraint Id List Of The Model
     */
    java.util.ArrayList<String> getPKConstraintIDList();

    /**
     * @return All Elements In All Objects In The Model
     */
    java.util.ArrayList<IGspCommonElement> getAllObjectElementList();

    /**
     * @return The Entity Assembly Info Of The Model
     */
    DataTypeAssemblyInfo getEntityAssemblyInfo();

    /**
     * @return The Core Assembly Info Of The Model
     */
    DataTypeAssemblyInfo getCoreAssemblyInfo();

    /**
     * @return The Api Namespace Of The Model
     */
    DataTypeAssemblyInfo getApiNamespace();

    /**
     * @return The Java Generated Config Id Of The Model
     */
    String getGeneratedConfigID();

    /**
     * @return The Dotnet Generated Config Id Of The Model,But It`s Useless Now
     */
    String getDotnetGeneratedConfigID();


    /**
     * @return The Version Control Info Of The Model
     */
    VersionControlInfo getVersionContronInfo();
    // endregion

}